import request from '../api'

const URL = '/urls'

export function getMenus(loginForm) {
    return request.get(URL+'/lists');
}

export function getAllUrlsByPage(dto){
    return request.post(URL+'/getAllUrlsByPage',dto);
}

export function getUrlDetailById(id){
    return request.get(URL+`/getUrlDetailById/${id}`);
}

export function addUrl(url){
    return request.post(URL+`/addUrl`,url);
}

export function updateUrlById(url){
    return request.put(URL+`/updateUrlById`,url);
}

export function removeUrl(id){
    return request.delete(URL+`/removeUrl/${id}`);
}

export function findAllUrls(){
    return request.get(URL+`/findAllUrls`);
}

export function UpdateUrlByUserId(dto){
    return request.post(URL+`/UpdateUrlByUserId`,dto);
}
export function getUrlsByUserId(id){
    return request.get(URL+`/getUrlsByUserId/${id}`);
}